package com.hkzhao.reportingsystem.service;

import com.hkzhao.reportingsystem.common.api.CommonResult;
import com.hkzhao.reportingsystem.mbg.model.Comment;
import com.hkzhao.reportingsystem.mbg.model.News;
import com.hkzhao.reportingsystem.mbg.model.User;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface NormalUserService {
    boolean userlogin(String openid,String username);
    User getUserFromToken(String openid);
    List<News> getListNews(int pageNum,int pageSize);
    List<Comment> getCommentListByNews(int pageNum,int pageSize,String news_id);
    List<Comment> getCommentListByUser(int pageNum,int pageSize,String user_token);
    CommonResult deleteCommentByUser(String comment_id,String user_token);
    @Transactional
    CommonResult addCommentByUserAndNew(String user_token,String news_id,String text);
}
